import 'package:json_annotation/json_annotation.dart';

part 'ListDataResponse.g.dart';
/// 作者: Tao
/// 日期: 2024/3/18
/// 时间: 16:28
/// 描述: 
/// 如果是List的就用这个
@JsonSerializable(genericArgumentFactories: true)
class ListDataResponse<T> {
  final List<T>? data;
  final int? errorCode;
  final String? errorMsg;

  ListDataResponse(this.data, this.errorCode, this.errorMsg);

  factory ListDataResponse.fromJson(Map<String, dynamic> json,
      T Function(dynamic json) fromJsonT) =>
      _$ListDataResponseFromJson(json, fromJsonT);

  Map<String, dynamic> toJson(dynamic Function(T value) toJsonT) => _$ListDataResponseToJson(this, toJsonT);
}